#ifndef __EVENT_MANAGER__
#define __EVENT_MANAGER__

#include "Ogre.h"

class EventManager
{
public:

	static EventManager* getInstance();

	/**
	/*@Sender : The instance address.
	/*@Event : The function address of the concrete event
	/*@time : The time of event playing 
	*/
	void TriggerEvent(int eventType, void * Sender, void * Event,  int time = 1 );
	void EventExecuteUpdate();


protected:

	EventManager();
	~EventManager();
	static EventManager * selfSingleton;
	
	typedef struct _EventWrapper
	{
		void * Sender;
		void * Event;
		int eventType;
		int eventID;
	public:
		_EventWrapper(){}
		~_EventWrapper(){}
	}EventWrapper;

	int eventID;//global serializer;
	std::map<int,EventWrapper *> mEventMap;
private:
};



#endif